package com.finance.loan;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @Author: Apollo
 * @Date: 2021/4/16
 * @Description: 还款计划
 */
@Entity
@Table(name = "repayment_schedule")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RepaymentSchedule implements Serializable {

    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 标识
     */
    private String code;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 是否删除 1:否 2:是
     */
    private Integer isDelete;

    /**
     * 还款金额
     */
    private Double repaymentAmount;

    /**
     * 申请贷款标识
     */
    private String applyForLoanCode;






    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_CODE = "code";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_IS_DELETE = "is_delete";

    public static final String COL_REPAYMENT_AMOUNT = "repayment_amount";

    public static final String COL_APPLY_FOR_LOAN_CODE = "apply_for_loan_code";


    /**
     * 每月还款计划
     */
    @Transient
    private List<MonthlyRepaymentPlan> monthlyRepaymentPlanList;

}